package com.mengma.ec.commons;

import com.mengma.ec.entity.User;

import javax.servlet.http.HttpSession;

/**
 * @Auther: xixi
 * @Date: 2018/9/18 10:50
 * @Description:
 */
public class ControllerCommons {


    public static ServerResponse checkLogin(HttpSession session){
        User user = (User) session.getAttribute(Const.CURRENT_USER);

        if (user == null){
            return ServerResponse.createByErrorMessage("");
        }
        return ServerResponse.createBySuccess("");
    }
}
